home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / printing / print multipage pict / print multipage pict.p < prev    next >
Encoding:
Text File  |  2000-09-28  |  1.5 KB  |  51 lines

  1. {
  2.     File:        Print multipage PICT.p
  3.  
  4.     Contains:    Print multipage PICT:  Takes a PICT larger than one page and "tiles" it so that
  5.                 it prints across the right number of sheets of paper to tape together and make
  6.                 a poster, like many drawing applications.  You can find a slightly cleaner
  7.                 version of this routine as part of Pascal Sample 3.0.
  8.  
  9.     Written by:     
  10.  
  11.     Copyright:    Copyright © 1984-1999 by Apple Computer, Inc., All Rights Reserved.
  12.  
  13.                 You may incorporate this Apple sample source code into your program(s) without
  14.                 restriction. This Apple sample source code has been provided "AS IS" and the
  15.                 responsibility for its operation is yours. You are not permitted to redistribute
  16.                 this Apple sample source code as "Apple sample source code" after having made
  17.                 changes. If you're going to re-distribute the source, we require that you make
  18.                 it clear in the source that the code was descended from Apple sample source
  19.                 code, but that you've made changes.
  20.  
  21.     Change History (most recent first):
  22.                 7/26/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  23.                 
  24.  
  25. }
  26. program PrintMultiPage;
  27.  
  28. uses
  29.     Printing,print,Quickdraw,Fonts,Windows,Menus,Dialogs,Events;
  30.  
  31. var
  32.     ignoreResult: BOOLEAN;
  33.     myPrintRecord: THPrint;
  34.  
  35. begin
  36.     InitGraf(@qd.thePort);
  37.     InitFonts;
  38.     FlushEvents(everyEvent, 0);    
  39.     InitWindows;
  40.     InitMenus;
  41.     TEInit;
  42.     InitDialogs(nil);
  43.     InitCursor;
  44.     
  45.     myPrintRecord := THPrint(NewHandle(sizeof(TPrint)));
  46.     PrOpen;
  47.     PrintDefault(myPrintRecord);
  48.     ignoreResult := PageSetup(myPrintRecord);
  49.     ignoreResult := Print(myPrintRecord);
  50.  
  51. end.